home *** CD-ROM | disk | FTP | other *** search
- Listing 1 (start.c)
- /* ---
- Simple routine to start all the processes
- for the lidar program. The program starts
- each routine with a fork call, and then
- terminates.
- --- */
-
- #include <stdio.h>
-
- /* --- process names --- */
- static char *tasks[] = { "lidar_acq",
- "lidar_graph", "lidar_write",
- "lidar_read", NULL};
- main ()
- {
- int i = 0;
- while (tasks[i] != NULL) {
- if (fork()) /* child, start task */
- execve (tasks[i], NULL, NULL);
- i++;
- }
- }
-